<template>
	<view class="withdrawInfo">
		<uni-forms ref="baseForm" label-position="left" label-width="80px">
			<uni-forms-item label="待提金额">
				{{momenyFormat(10000)}}
			</uni-forms-item>
			<uni-forms-item label="本次可提">
				{{momenyFormat(10000)}}
			</uni-forms-item>
			<uni-forms-item label="剩余金额">
				{{momenyFormat(10000)}}
			</uni-forms-item>
			<uni-forms-item label="收款方式">
				<radio-group @change="changePay">
					<label class="radio">
						<radio class="radioT" value="wx" checked="true" />微信
					</label>
					<label class="radio">
						<radio class="radioT" value="zfb" />支付宝
					</label>
					<label class="radio">
						<radio class="radioT" value="bank" />银行卡
					</label>
				</radio-group>
			</uni-forms-item>
			<uni-forms-item label="收款账户" v-if="pay=='bank'">
				<uni-data-select v-model="value" :localdata="range" @change="change"></uni-data-select>
			</uni-forms-item>
		</uni-forms>
		<view class="bankContent" v-if="value&&pay=='bank'">
			<uni-forms ref="baseForm" label-position="left" label-width="80px">
				<uni-forms-item label="账号">
					111000222000
				</uni-forms-item>
				<uni-forms-item label="户名">
					北京银行
				</uni-forms-item>
				<uni-forms-item label="开户行">
					北京银行北京分行
				</uni-forms-item>
			</uni-forms>
		</view>
		<view class="fixBtn">
			<button type="primary">提 现</button>
		</view>
	</view>
</template>

<script>
	import {
		momenyFormat
	} from '../../utils/utils.js'
	export default {
		data() {
			return {
				momenyFormat,
				range: [],
				value: '',
				pay: 'wx'
			}
		},
		methods: {
			changePay(e) {
				this.pay = e.detail.value
			},
		}
	}
</script>

<style scoped lang="scss">
	.withdrawInfo {
		background-color: #fff;
		height: 100%;
		box-sizing: border-box;
		padding: 10px;

		.bankContent {
			margin: 10px;
			padding: 10px;
			box-sizing: border-box;
			box-shadow: 1px 1px 5px #ccc;
			border-radius: 5px;
		}

		.fixBtn {
			position: fixed;
			bottom: 40px;
			width: calc(100% - 40px);
			left: 20px;
		}

		.radio {

			margin-right: 8px;
		}

		.radioT {
			transform: scale(0.7);
		}
	}
</style>